// created by noellynch
// Apr 25, 2008

package com.sceneworker.util.xml.test;

import java.util.ArrayList;
import java.util.Hashtable;

import com.sceneworker.util.xml.BaseTag;
import com.sceneworker.util.xml.TagCallBackLoader;
import com.sceneworker.util.xml.TagCallback;

public class ImporterTag implements TagCallback
{
	private		String		mstr_desc = "";
	private		String		mstr_class = "";
	private		boolean		mb_createNode;
	
	public void 
	handleEnd(TagCallBackLoader cl_loader, String str_data) 
	{
		cl_loader.popDataSink();
		
		ArrayList<Object>	lcla_buffer = (ArrayList<Object>)cl_loader.getCurrentDataSink();
		lcla_buffer.add(this);
	}

	public void 
	handleStart(TagCallBackLoader cl_loader, Hashtable<String, String> cla_attrs) 
	{
		cl_loader.pushDataSink(this);
		
		BaseTag.attributeParse(cl_loader, cla_attrs, this);
	}
	
	
	public	void
	attrSet_desc(String cl_data)
	{
		mstr_desc = cl_data;
	}
	
	public	void
	attrSet_class(String cl_data)
	{
		mstr_class = cl_data;		
	}

	public	void
	createNodeOn() {
		mb_createNode = true;
	}
	
	public	String
	toString()
	{
		return "desc = " + mstr_desc + " : class = " + mstr_class + " : create node = " + mb_createNode;
	}
}
